Bentley WaterGEMS CONNECT Edition Help

Using ModelBuilder to Import Time Series Data

Time Series data maps onto the following two table types in ModelBuilder: Time Series, and Time Series Collection. The "Time Series" mapping represents entries in the TreeView along the left of the form (including the simple "Start Date Time", "Element", and "Notes" values shown on the right). The "Time Series Collection" mapping represents the tabular data shown in the table at the bottom right of the form.

Export Sample Time Series Data

To automatically determine the appropriate values for handling Pipe Flow time series data, we're going to first export a sample from WaterGEMS to Excel.

Note: We recommend that you choose MSAccess over MSExcel if possible; there is no explicit way to specify the data-type of a column in Excel, which can result in some problems.
  1. First, create a sample Pipe Flow time series in WaterGEMS .
  2. Next, create a new Excel .xls file. We'll need two "sheets" to receive the data (the default "Sheet1" and "Sheet2" will do).
  3. Time Series: This is the more difficult of the two Excel sheets we need to set up. To determine the columns to define in Excel, create a temporary ModelBuilder connection and get to the "Specify Field Mappings" step (you won't be saving this connection, so to get past Step 1 of the Wizard, just pick any data source). Navigate to this step, choose the Time Series table type, and click on the "Property" drop-down field.
  4. Click on the Sheet1 tab in Excel to define the necessary columns for the "Time Series" table (You don't need all of these columns for Flow Data, but go ahead and define them all to be sure we don't miss any that are required for your use-case).
  5. Time Series Collection: Again, get to the "Specify Field Mappings" step in ModelBuilder, choose the "Time Series Collection" table type, and click on the "Property" drop-down field to determine the columns to define.
  6. Click on the Sheet2 tab in Excel and define the necessary columns for the "Time Series Collection" table.
  7. Save and close your spreadsheet

Define the ModelBuilder Connection

Now we're ready to create the ModelBuilder connection to this spreadsheet

  1. Open ModelBuilder and create a new Connection. In step 1 of the Wizard, choose "Excel" as the data source type, browse to the Excel spreadsheet that you created to select it. You should see Sheet1 and Sheet2 in the list of available tables, select those (and unselect any others that appear).
  2. Navigate through the next few steps, just use the defaults there.
  3. When you reach the Mapping Step, set things up for Sheet1 and Sheet2.
  4. Navigate to the end of the Wizard.
  5. On the last step, click "No" for the "Would you like to build a model now?" prompt and click [Finish].

Synchronize Out from ModelBuilder

  1. Choose the connection you just defined (be sure to close the Excel spreadsheet you just defined), and click the Sync Out toolbar button.
  2. The sample time series data from WaterGEMS will now be available in the Excel spreadsheet you created. Using that as a go-by, you should be able to enter the data in the appropriate format to import in to WaterGEMS .